import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import './css/index.scss';
import './mock';

// 引入ui 库
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
 
// 引入ui icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

import {createPinia} from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
const store = createPinia()
store.use(piniaPluginPersistedstate)
app.use(store)
app.use(ElementPlus)
app.use(router)
app.mount('#app')

app.config.globalProperties.$testVar = 'testVar';